home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2720 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  36 lines

  1. Path: news.lpr.carel.fi!usenet
  2. From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C grammar for yacc
  5. Date: Tue, 23 Jan 1996 14:39:17 +0200
  6. Organization: Carelcomp Forest
  7. Message-ID: <3104D6F5.136E@cmt.lpr.mail.carel.fi>
  8. References: <4e0ecm$r8r@news.cc.brandeis.edu>
  9. NNTP-Posting-Host: renoir.cclahti.carel.fi
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=iso-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Mailer: Mozilla 2.0b6a (WinNT; I)
  14.  
  15. Michael Bukatin wrote:
  16. > I am looking for a C grammar in yacc/lex format (to use in
  17. > a custom-made program of analysis and transformation of C code).
  18. > If someone knows where I can find the files with such grammar,
  19. > I would greatly appreciate this information.
  20. > Misha
  21.  
  22. One place to look at is the book `Implementing compiler languages in 
  23. C┤ by Allen I. Holub (Prentice-Hall), where you start off by writing a 
  24. lex-like tool and a yacc-like tool, and end up by having definitions 
  25. for a C language subset that you can then improve. Also, some Unix 
  26. variants (like Linux) I've seen come with a C grammar (and many 
  27. others, too).
  28.  
  29. HTH,
  30. AriL
  31. -- 
  32. All my opinions are mine and mine alone.
  33.